//
//  WCNPiccPatientCell.m
//  WCN
//
//  Created by wsj2015 on 16/3/31.
//  Copyright © 2016年 ShanghaiCize Trade And Business Co., Ltd. All rights reserved.
//

#import "WCNPiccPatientCell.h"
#import "WCImageView +setImage.h"
#import "WCTSetTextTool.h"

@implementation WCNPiccPatientCell

- (void)awakeFromNib {
    // Initialization code
    
    self.nameLabel.textColor =[UIColor orangeColor];
     self.ageLabel.textColor =[UIColor orangeColor];
     self.sexLabel.textColor =[UIColor orangeColor];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setModel:(WCNMyPatientModel *)model
{
    _model = model;
    //住院患者
    if ([model.patientType integerValue] ==1) {
        self.bedLabel.text =[NSString stringWithFormat:@"%@",model.hosPatientNo];
        self.tagImageView.image =[UIImage imageNamed:@"Patient_0th"];
        self.tabLabel.text = @"床";
    }else if ([model.patientType integerValue] ==2){
        self.bedLabel.text =[NSString stringWithFormat:@"%@",model.outPatientNo];
        self.tagImageView.image =[UIImage imageNamed:@"Patient_1th"];
        self.tabLabel.text = @"门诊号";
    }else if ([model.patientType integerValue] ==3){
        self.bedLabel.text =[NSString stringWithFormat:@"其他"];
        self.tagImageView.image =[UIImage imageNamed:@"Patient_2th"];
        self.tabLabel.text = @"";
    }
    
    [WCTSetTextTool  setTextView:self.nameLabel text:model.name initText:@""];
     [WCTSetTextTool  setTextView:self.sexLabel text:model.name initText:@""];
      [WCTSetTextTool  setTextView:self.ageLabel text:[NSString stringWithFormat:@"%@",model.age] initText:@""];
     [WCTSetTextTool  setTextView:self.digLabel text:model.clinicalDiagnosis initText:@""];
//    self.nameLabel.text = model.name;
//    self.ageLabel.text =[NSString stringWithFormat:@"%@",model.age];
    self.sexLabel.text = model.sex?@"女":@"男" ;
//    self.digLabel.text = model.clinicalDiagnosis;
    
}
@end
